### Alizade, Dancygier, Ditlmann 
### "National Penalties Reversed"
### Replication Code 
### Table A8
### For questions, contact jalizade@princeton.edu

# empty environment
rm(list = ls())


#setwd("")
setwd("C:/Users/Jey/Dropbox/WZB/NaturalizationExperiment/Submission/JOP/replication_JOP/data")


# load necessary packages
library(readstata13)


# load data set
dat <- read.dta13("data_can_pop.dta")


### Only Men ### 

# N
length(dat$can_mun_men[dat$can_mun_men>0 & !is.na(dat$can_mun_men)])

# Min.
min(dat$can_mun_men[dat$can_mun_men>0 & !is.na(dat$can_mun_men)])

# Mean
mean(dat$can_mun_men[dat$can_mun_men>0 & !is.na(dat$can_mun_men)])

# Max.
max(dat$can_mun_men[dat$can_mun_men>0 & !is.na(dat$can_mun_men)])

# SD
sd(dat$can_mun_men[dat$can_mun_men>0 & !is.na(dat$can_mun_men)])


### Men + Women ### 

# N
length(dat$can_mun[dat$can_mun>0 & !is.na(dat$can_mun)])

# Min.
min(dat$can_mun[dat$can_mun>0 & !is.na(dat$can_mun)])

# Mean
mean(dat$can_mun[dat$can_mun>0 & !is.na(dat$can_mun)])

# Max.
max(dat$can_mun[dat$can_mun>0 & !is.na(dat$can_mun)])

# SD
sd(dat$can_mun[dat$can_mun>0 & !is.na(dat$can_mun)])

